/**
 *
 */
package com.googlecode.pkchat.pkserver;

import java.io.IOException;
import java.io.PrintWriter;
import java.net.Socket;
import java.net.ServerSocket;

import com.sun.corba.se.spi.activation.Server;

/**
 * @author Simon Pratt
 *
 */
public class PKChatServer {


	/**
	 *
	 */
	public static void main(String[] args) throws IOException{
		final int pkcs_port = 8888;
		Server server = new Server(pkcs_port);
		System.out.println("Waiting for clients to connect...");
		PrintWriter out;

		while(true)
		{
			Socket s = server.accept();
			out = new PrintWriter(s.getOutputStream());
			System.out.println("Client connected.");
			EchoService echo = new EchoService(s,out);
			server.s
			Thread t = new Thread(echo);
			t.start();
		}
	}
}